using System.IO;
using System.Net.Sockets;
using OracleInternal.Common;

namespace OracleInternal.Network
{
	internal interface ITransportAdapter
	{
		ConOraBufPool OraBufPool
		{
			set;
		}

		bool Connected
		{
			get;
		}

		bool NeedReneg
		{
			get;
		}

		void Connect(ConnectionOption conOption);

		Stream ConnectIterate();

		void Listen(ConnectionOption conOption);

		ITransportAdapter Answer(ConnectionOption conOption);

		void Disconnect();

		Stream GetStream();

		Socket GetSocket();

		Socket GetTestSocket();

		bool UrgentDataSupported();

		void SendUrgent(byte[] data, int offset, int length);

		void Send(OraBuf OB);

		void BeginAsyncReceives(OraBuf.AsyncReceiveCallback Callback, int AsyncBufferSize);

		void Renegotiate(ConnectionOption conOption);
	}
}
